﻿@{
    ViewBag.Title = "ActionList";
    Layout = "~/Views/Shared/_ManagerLayoutPage.cshtml";

    var data = ViewData["data"];
}

@section ChildPageCss
    {

    <link href="@RS.Environment.ConfigurationHelper.GetAppSettings("VirtualUrl")/Resource/vendor/jsTree/style.min.css" rel="stylesheet" />

}

<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-body">
                <div class="form-group">
                    <div class="col-sm-2">权限</div>
                    <div class="col-sm-10" id="baseContent">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@section ChildPageScript{


    <script src="@RS.Environment.ConfigurationHelper.GetAppSettings("VirtualUrl")/Resource/vendor/jsTree/jstree.min.js"></script>

    <script>



        $(document).ready(function () {
            Init();
        });

        function Init() {
            $.ajax({

                url: "@RS.Environment.ConfigurationHelper.GetAppSettings("VirtualUrl")" + "@Url.Action("GetKnowledgeAuthInfo", "KnowledgeAuthManager")",
                dataType: "json",
                data: { "id": "@Context.Request.Query["id"]" },
                type: "get",
                success: function (data) {
                    console.log(data);
                    if (!data.IsError) {
                        $("#baseContent").jstree({
                            "checkbox":
                            {
                                "keep_selected_style": false
                            },
                            "core": data.Result,
                            "plugins": ["checkbox"]

                        });
                    }
                },
                error: function (data) {

                    console.log(data);

                }
            })
        }
    </script>

}
